package org.example.design.bridge;

import org.example.design.bridge.channel.Pay;
import org.example.design.bridge.channel.WxPay;
import org.example.design.bridge.channel.ZfbPay;
import org.example.design.bridge.mode.PayCypher;
import org.example.design.bridge.mode.PayFaceMode;
import org.example.design.bridge.mode.PayFingerprintMode;

import java.math.BigDecimal;

/**
 * @Classname bridgeTest
 * @Description 桥接模式测试类
 * @Date 2020/11/3 3:14 下午
 * @Created by xiangjd
 */
public class bridgeTest {
    public static void main(String[] args) {
        System.out.println("\r\n模拟测试场景；微信支付、人脸方式。");
        Pay wxPay = new WxPay(new PayFaceMode());
        wxPay.transfer("weixin_1092033111", "100000109893", BigDecimal.valueOf(100));

        System.out.println("\r\n模拟测试场景；支付宝支付、指纹方式。");
        Pay zfbPay = new ZfbPay(new PayFingerprintMode());
        zfbPay.transfer("jbhxh111111", "23232323232323", new BigDecimal(100));
    }
}
